package com.probox.common.entity.vo.WeCom;

import cn.hutool.core.util.ObjectUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Data
public class WeComContentVo implements Serializable {

    private String levelName;
    private Integer customerGrade;
    private String customerIcon;
    private String levelColor;
    private Long customerId;

    /**
     * 美容师名称
     */
    private String cosmetician;

    /**
     * 头像
     */
    private String avatar;

    /**
     * 技能评分
     */
    private BigDecimal skillStar;
    /**
     * 态度评分
     */
    private BigDecimal attitudeStar;
    /**
     * 服务评分
     */
    private BigDecimal serveStar;

    /**
     * 评价时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date appraiseTime;
    /**
     * 评价内容
     */
    private String appraiseContent;
    /**
     * 评价图片
     */
    private String appraiseImages;

    public String[] getAppraiseImagesArr() {
        if (ObjectUtil.isNotEmpty(appraiseImages)) {
            if (appraiseImages.split(",").length > 0) {
                return appraiseImages.split(",");
            }
        }
        return new String[0];
    }
}
